|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectcontrolP5.ControlP5XMLElement
public class ControlP5XMLElement
XMLElement is a representation of an XML object. The object is able to parse XML code.
XMLElement xml = new XMLElement();
FileReader reader = new FileReader("filename.xml");
xml.parseFromReader(reader);
enumerateAttributeNames. The attribute
values can be retrieved using the method
getStringAttribute. The
following example shows how to list the attributes of an element:
XMLElement element = ...;
Enumeration enum = element.getAttributeNames();
while (enum.hasMoreElements()) {
String key = (String) enum.nextElement();
String value = element.getStringAttribute(key);
System.out.println(key + " = " + value);
}
enumerateChildren. The number of child elements
can be retrieved using countChildren.
<title>The Title</title>
getContent.
createAnotherElement which has to return a
new copy of the receiver.
nanoxml.XMLParseException| Field Summary | |
|---|---|
static int |
NANOXML_MAJOR_VERSION
Major version of NanoXML. |
static int |
NANOXML_MINOR_VERSION
Minor version of NanoXML. |
| Constructor Summary | |
|---|---|
ControlP5XMLElement()
Creates and initializes a new XML element. |
|
ControlP5XMLElement(boolean skipLeadingWhitespace)
Creates and initializes a new XML element. |
|
ControlP5XMLElement(java.util.Hashtable entities)
Creates and initializes a new XML element. |
|
ControlP5XMLElement(java.util.Hashtable entities,
boolean skipLeadingWhitespace)
Creates and initializes a new XML element. |
|
ControlP5XMLElement(java.util.Hashtable entities,
boolean skipLeadingWhitespace,
boolean ignoreCase)
Creates and initializes a new XML element. |
|
| Method Summary | |
|---|---|
void |
addChild(ControlP5XMLElement child)
Adds a child element. |
void |
addProperty(java.lang.String name,
double value)
Deprecated. Use setDoubleAttribute instead. |
void |
addProperty(java.lang.String key,
int value)
Deprecated. Use setIntAttribute instead. |
void |
addProperty(java.lang.String name,
java.lang.Object value)
Deprecated. Use setAttribute instead. |
int |
countChildren()
Returns the number of child elements of the element. |
java.util.Enumeration |
enumerateAttributeNames()
Enumerates the attribute names. |
java.util.Enumeration |
enumerateChildren()
Enumerates the child elements. |
java.util.Enumeration |
enumeratePropertyNames()
Deprecated. Use enumerateAttributeNames instead. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns an attribute of the element. |
java.lang.Object |
getAttribute(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey,
boolean allowLiterals)
Returns an attribute by looking up a key in a hashtable. |
java.lang.Object |
getAttribute(java.lang.String name,
java.lang.Object defaultValue)
Returns an attribute of the element. |
boolean |
getBooleanAttribute(java.lang.String name,
java.lang.String trueValue,
java.lang.String falseValue,
boolean defaultValue)
Returns an attribute of the element. |
java.util.Vector |
getChildren()
Returns the child elements as a Vector. |
java.lang.String |
getContent()
Returns the PCDATA content of the object. |
java.lang.String |
getContents()
Deprecated. Use getContent instead. |
double |
getDoubleAttribute(java.lang.String name)
Returns an attribute of the element. |
double |
getDoubleAttribute(java.lang.String name,
double defaultValue)
Returns an attribute of the element. |
double |
getDoubleAttribute(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey,
boolean allowLiteralNumbers)
Returns an attribute by looking up a key in a hashtable. |
int |
getIntAttribute(java.lang.String name)
Returns an attribute of the element. |
int |
getIntAttribute(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey,
boolean allowLiteralNumbers)
Returns an attribute by looking up a key in a hashtable. |
int |
getIntAttribute(java.lang.String name,
int defaultValue)
Returns an attribute of the element. |
int |
getIntProperty(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey)
Deprecated. Use getIntAttribute instead. |
int |
getLineNr()
Returns the line nr in the source data on which the element is found. |
java.lang.String |
getName()
Returns the name of the element. |
java.lang.String |
getProperty(java.lang.String name)
Deprecated. Use getStringAttribute instead. |
double |
getProperty(java.lang.String name,
double defaultValue)
Deprecated. Use getDoubleAttribute instead. |
java.lang.Object |
getProperty(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey)
Deprecated. Use getAttribute instead. |
int |
getProperty(java.lang.String name,
int defaultValue)
Deprecated. Use getIntAttribute instead. |
java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
Deprecated. Use getStringAttribute instead. |
boolean |
getProperty(java.lang.String key,
java.lang.String trueValue,
java.lang.String falseValue,
boolean defaultValue)
Deprecated. Use getBooleanAttribute instead. |
double |
getSpecialDoubleProperty(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey)
Deprecated. Use getDoubleAttribute instead. |
int |
getSpecialIntProperty(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey)
Deprecated. Use getIntAttribute instead. |
java.lang.String |
getStringAttribute(java.lang.String name)
Returns an attribute of the element. |
java.lang.String |
getStringAttribute(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey,
boolean allowLiterals)
Returns an attribute by looking up a key in a hashtable. |
java.lang.String |
getStringAttribute(java.lang.String name,
java.lang.String defaultValue)
Returns an attribute of the element. |
java.lang.String |
getStringProperty(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey)
Deprecated. Use getStringAttribute instead. |
java.lang.String |
getTagName()
Deprecated. Use getName instead. |
void |
parseCharArray(char[] input,
int offset,
int end)
Reads one XML element from a char array and parses it. |
void |
parseCharArray(char[] input,
int offset,
int end,
int startingLineNr)
Reads one XML element from a char array and parses it. |
void |
parseFromReader(java.io.Reader reader)
Reads one XML element from a java.io.Reader and parses it. |
void |
parseFromReader(java.io.Reader reader,
int startingLineNr)
Reads one XML element from a java.io.Reader and parses it. |
void |
parseString(java.lang.String string)
Reads one XML element from a String and parses it. |
void |
parseString(java.lang.String string,
int offset)
Reads one XML element from a String and parses it. |
void |
parseString(java.lang.String string,
int offset,
int end)
Reads one XML element from a String and parses it. |
void |
parseString(java.lang.String string,
int offset,
int end,
int startingLineNr)
Reads one XML element from a String and parses it. |
void |
removeAttribute(java.lang.String name)
Removes an attribute. |
void |
removeChild(ControlP5XMLElement child)
Removes a child element. |
void |
removeChild(java.lang.String name)
Deprecated. Use removeAttribute instead. |
void |
removeProperty(java.lang.String name)
Deprecated. Use removeAttribute instead. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Adds or modifies an attribute. |
void |
setContent(java.lang.String content)
Changes the content string. |
void |
setDoubleAttribute(java.lang.String name,
double value)
Adds or modifies an attribute. |
void |
setIntAttribute(java.lang.String name,
int value)
Adds or modifies an attribute. |
void |
setName(java.lang.String name)
Changes the name of the element. |
void |
setTagName(java.lang.String name)
Deprecated. Use setName instead. |
java.lang.String |
toString()
Writes the XML element to a string. |
void |
write(java.io.Writer writer)
Writes the XML element to a writer. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int NANOXML_MAJOR_VERSION
nanoxml.XMLElement#NANOXML_MINOR_VERSION,
Constant Field Valuespublic static final int NANOXML_MINOR_VERSION
nanoxml.XMLElement#NANOXML_MAJOR_VERSION,
Constant Field Values| Constructor Detail |
|---|
public ControlP5XMLElement()
new XMLElement(new Hashtable(), false, true)
XMLElement(Hashtable),
nanoxml.XMLElement#XMLElement(boolean),
XMLElement(Hashtable, boolean)public ControlP5XMLElement(java.util.Hashtable entities)
new XMLElement(entities, false, true)
entities - The entity conversion table.
entities != null
nanoxml.XMLElement#XMLElement(),
nanoxml.XMLElement#XMLElement(boolean),
XMLElement(Hashtable, boolean)public ControlP5XMLElement(boolean skipLeadingWhitespace)
new XMLElement(new Hashtable(), skipLeadingWhitespace, true)
skipLeadingWhitespace - true if leading and trailing whitespace in PCDATA
content has to be removed.
nanoxml.XMLElement#XMLElement(),
XMLElement(Hashtable),
XMLElement(Hashtable, boolean)
public ControlP5XMLElement(java.util.Hashtable entities,
boolean skipLeadingWhitespace)
new XMLElement(entities, skipLeadingWhitespace, true)
entities - The entity conversion table.skipLeadingWhitespace - true if leading and trailing whitespace in PCDATA
content has to be removed.
entities != null
nanoxml.XMLElement#XMLElement(),
nanoxml.XMLElement#XMLElement(boolean),
XMLElement(Hashtable)
public ControlP5XMLElement(java.util.Hashtable entities,
boolean skipLeadingWhitespace,
boolean ignoreCase)
entities - The entity conversion table.skipLeadingWhitespace - true if leading and trailing whitespace in PCDATA
content has to be removed.ignoreCase - true if the case of element and attribute names have
to be ignored.
entities != null
nanoxml.XMLElement#XMLElement(),
nanoxml.XMLElement#XMLElement(boolean),
XMLElement(Hashtable),
XMLElement(Hashtable, boolean)| Method Detail |
|---|
public void addChild(ControlP5XMLElement child)
child - The child element to add.
child != null
child.getName() != null
child does not have a parent element
nanoxml.XMLElement#countChildren(),
nanoxml.XMLElement#enumerateChildren(),
nanoxml.XMLElement#getChildren(),
removeChild(XMLElement)
public void setAttribute(java.lang.String name,
java.lang.Object value)
name - The name of the attribute.value - The value of the attribute.
name != null
name is a valid XML identifier
value != null
setDoubleAttribute(String, double),
setIntAttribute(String, int),
nanoxml.XMLElement#enumerateAttributeNames(),
getAttribute(String),
getAttribute(String, Object),
getAttribute(String, Hashtable, String, boolean),
getStringAttribute(String),
getStringAttribute(String, String),
getStringAttribute(String, Hashtable, String, boolean)
public void addProperty(java.lang.String name,
java.lang.Object value)
setAttribute instead.
name - The name of the attribute.value - The value of the attribute.
public void setIntAttribute(java.lang.String name,
int value)
name - The name of the attribute.value - The value of the attribute.
name != null
name is a valid XML identifier
setDoubleAttribute(String, double),
setAttribute(String, Object),
removeAttribute(String),
nanoxml.XMLElement#enumerateAttributeNames(),
getIntAttribute(String),
getIntAttribute(String, int),
getIntAttribute(String, Hashtable, String, boolean)
public void addProperty(java.lang.String key,
int value)
setIntAttribute instead.
name - The name of the attribute.value - The value of the attribute.
public void setDoubleAttribute(java.lang.String name,
double value)
name - The name of the attribute.value - The value of the attribute.
name != null
name is a valid XML identifier
setIntAttribute(String, int),
setAttribute(String, Object),
removeAttribute(String),
nanoxml.XMLElement#enumerateAttributeNames(),
getDoubleAttribute(String),
getDoubleAttribute(String, double),
getDoubleAttribute(String, Hashtable, String, boolean)
public void addProperty(java.lang.String name,
double value)
setDoubleAttribute instead.
name - The name of the attribute.value - The value of the attribute.public int countChildren()
result >= 0
addChild(XMLElement),
nanoxml.XMLElement#enumerateChildren(),
nanoxml.XMLElement#getChildren(),
removeChild(XMLElement)public java.util.Enumeration enumerateAttributeNames()
result != null
setDoubleAttribute(String, double),
setIntAttribute(String, int),
setAttribute(String, Object),
removeAttribute(String),
getAttribute(String),
getAttribute(String, String),
getAttribute(String, Hashtable, String, boolean),
getStringAttribute(String),
getStringAttribute(String, String),
getStringAttribute(String, Hashtable, String, boolean),
getIntAttribute(String),
getIntAttribute(String, int),
getIntAttribute(String, Hashtable, String, boolean),
getDoubleAttribute(String),
getDoubleAttribute(String, double),
getDoubleAttribute(String, Hashtable, String, boolean),
getBooleanAttribute(String, String, String, boolean)public java.util.Enumeration enumeratePropertyNames()
enumerateAttributeNames instead.
public java.util.Enumeration enumerateChildren()
result != null
addChild(XMLElement),
nanoxml.XMLElement#countChildren(),
nanoxml.XMLElement#getChildren(),
removeChild(XMLElement)public java.util.Vector getChildren()
result != null
addChild(XMLElement),
nanoxml.XMLElement#countChildren(),
nanoxml.XMLElement#enumerateChildren(),
removeChild(XMLElement)public java.lang.String getContents()
getContent instead.
null is returned.
public java.lang.String getContent()
null is returned.
setContent(String)public int getLineNr()
0 there is no associated source data.
result >= 0
public java.lang.Object getAttribute(java.lang.String name)
null is returned.
name - The name of the attribute.
name != null
name is a valid XML identifier
setAttribute(String, Object),
removeAttribute(String),
nanoxml.XMLElement#enumerateAttributeNames(),
getAttribute(String, Object),
getAttribute(String, Hashtable, String, boolean)
public java.lang.Object getAttribute(java.lang.String name,
java.lang.Object defaultValue)
defaultValue is returned.
name - The name of the attribute.defaultValue - Key to use if the attribute is missing.
name != null
name is a valid XML identifier
setAttribute(String, Object),
removeAttribute(String),
nanoxml.XMLElement#enumerateAttributeNames(),
getAttribute(String),
getAttribute(String, Hashtable, String, boolean)
public java.lang.Object getAttribute(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey,
boolean allowLiterals)
As an example, if valueSet contains the mapping "one" =>
"1" and the element contains the attribute attr="one",
then getAttribute("attr", mapping, defaultKey, false) returns
"1".
name - The name of the attribute.valueSet - Hashtable mapping keys to values.defaultKey - Key to use if the attribute is missing.allowLiterals - true if literals are valid.
name != null name is a valid XML
identifier valueSet != null
valueSet are strings
setAttribute(String, Object),
removeAttribute(String),
nanoxml.XMLElement#enumerateAttributeNames(),
getAttribute(String),
getAttribute(String, Object)public java.lang.String getStringAttribute(java.lang.String name)
null is returned.
name - The name of the attribute.
name != null
name is a valid XML identifier
setAttribute(String, Object),
removeAttribute(String),
nanoxml.XMLElement#enumerateAttributeNames(),
getStringAttribute(String, String),
getStringAttribute(String, Hashtable, String, boolean)
public java.lang.String getStringAttribute(java.lang.String name,
java.lang.String defaultValue)
defaultValue is returned.
name - The name of the attribute.defaultValue - Key to use if the attribute is missing.
name != null
name is a valid XML identifier
setAttribute(String, Object),
removeAttribute(String),
nanoxml.XMLElement#enumerateAttributeNames(),
getStringAttribute(String),
getStringAttribute(String, Hashtable, String, boolean)
public java.lang.String getStringAttribute(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey,
boolean allowLiterals)
As an example, if valueSet contains the mapping "one" =>
"1" and the element contains the attribute attr="one",
then getAttribute("attr", mapping, defaultKey, false) returns
"1".
name - The name of the attribute.valueSet - Hashtable mapping keys to values.defaultKey - Key to use if the attribute is missing.allowLiterals - true if literals are valid.
name != null name is a valid XML
identifier valueSet != null
valueSet are strings valueSet
are strings
setAttribute(String, Object),
removeAttribute(String),
nanoxml.XMLElement#enumerateAttributeNames(),
getStringAttribute(String),
getStringAttribute(String, String)public int getIntAttribute(java.lang.String name)
0 is returned.
name - The name of the attribute.
name != null
name is a valid XML identifier
setIntAttribute(String, int),
nanoxml.XMLElement#enumerateAttributeNames(),
getIntAttribute(String, int),
getIntAttribute(String, Hashtable, String, boolean)
public int getIntAttribute(java.lang.String name,
int defaultValue)
defaultValue is returned.
name - The name of the attribute.defaultValue - Key to use if the attribute is missing.
name != null
name is a valid XML identifier
setIntAttribute(String, int),
nanoxml.XMLElement#enumerateAttributeNames(),
getIntAttribute(String),
getIntAttribute(String, Hashtable, String, boolean)
public int getIntAttribute(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey,
boolean allowLiteralNumbers)
As an example, if valueSet contains the mapping "one" => 1 and
the element contains the attribute attr="one", then
getIntAttribute("attr", mapping, defaultKey, false) returns
1.
name - The name of the attribute.valueSet - Hashtable mapping keys to values.defaultKey - Key to use if the attribute is missing.allowLiteralNumbers - true if literal numbers are valid.
name != null name is a valid XML
identifier valueSet != null
valueSet are strings valueSet
are Integer objects defaultKey is either null
, a key in valueSet or an integer.
setIntAttribute(String, int),
nanoxml.XMLElement#enumerateAttributeNames(),
getIntAttribute(String),
getIntAttribute(String, int)public double getDoubleAttribute(java.lang.String name)
0.0 is returned.
name - The name of the attribute.
name != null
name is a valid XML identifier
setDoubleAttribute(String, double),
nanoxml.XMLElement#enumerateAttributeNames(),
getDoubleAttribute(String, double),
getDoubleAttribute(String, Hashtable, String, boolean)
public double getDoubleAttribute(java.lang.String name,
double defaultValue)
defaultValue is returned.
name - The name of the attribute.defaultValue - Key to use if the attribute is missing.
name != null
name is a valid XML identifier
setDoubleAttribute(String, double),
nanoxml.XMLElement#enumerateAttributeNames(),
getDoubleAttribute(String),
getDoubleAttribute(String, Hashtable, String, boolean)
public double getDoubleAttribute(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey,
boolean allowLiteralNumbers)
As an example, if valueSet contains the mapping "one" =>
1.0 and the element contains the attribute attr="one",
then getDoubleAttribute("attr", mapping, defaultKey, false)
returns 1.0.
name - The name of the attribute.valueSet - Hashtable mapping keys to values.defaultKey - Key to use if the attribute is missing.allowLiteralNumbers - true if literal numbers are valid.
name != null name is a valid XML
identifier valueSet != null
valueSet are strings valueSet
are Double objects defaultKey is either null
, a key in valueSet or a double.
setDoubleAttribute(String, double),
nanoxml.XMLElement#enumerateAttributeNames(),
getDoubleAttribute(String),
getDoubleAttribute(String, double)
public boolean getBooleanAttribute(java.lang.String name,
java.lang.String trueValue,
java.lang.String falseValue,
boolean defaultValue)
defaultValue is returned.
If the value of the attribute is equal to trueValue,
true is returned.
If the value of the attribute is equal to falseValue,
false is returned.
If the value doesn't match trueValue or
falseValue, an exception is thrown.
name - The name of the attribute.trueValue - The value associated with true.falseValue - The value associated with true.defaultValue - Value to use if the attribute is missing.
name != null
name is a valid XML identifier
trueValue and falseValue are different
strings.
setAttribute(String, Object),
removeAttribute(String),
nanoxml.XMLElement#enumerateAttributeNames()
public int getIntProperty(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey)
getIntAttribute instead.
public java.lang.String getProperty(java.lang.String name)
getStringAttribute instead.
public java.lang.String getProperty(java.lang.String name,
java.lang.String defaultValue)
getStringAttribute instead.
public int getProperty(java.lang.String name,
int defaultValue)
getIntAttribute instead.
public double getProperty(java.lang.String name,
double defaultValue)
getDoubleAttribute instead.
public boolean getProperty(java.lang.String key,
java.lang.String trueValue,
java.lang.String falseValue,
boolean defaultValue)
getBooleanAttribute instead.
public java.lang.Object getProperty(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey)
getAttribute instead.
public java.lang.String getStringProperty(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey)
getStringAttribute instead.
public int getSpecialIntProperty(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey)
getIntAttribute instead.
public double getSpecialDoubleProperty(java.lang.String name,
java.util.Hashtable valueSet,
java.lang.String defaultKey)
getDoubleAttribute instead.
public java.lang.String getName()
setName(String)public java.lang.String getTagName()
getName instead.
public void parseFromReader(java.io.Reader reader)
throws java.io.IOException,
ControlP5XMLParseException
reader - The reader from which to retrieve the XML data.
reader != null
reader is not closed
java.io.IOException - If an error occured while reading the input.
nanoxml.XMLParseException - If an error occured while parsing the read data.
ControlP5XMLParseException
public void parseFromReader(java.io.Reader reader,
int startingLineNr)
throws java.io.IOException,
ControlP5XMLParseException
reader - The reader from which to retrieve the XML data.startingLineNr - The line number of the first line in the data.
reader != null
reader is not closed
java.io.IOException - If an error occured while reading the input.
nanoxml.XMLParseException - If an error occured while parsing the read data.
ControlP5XMLParseException
public void parseString(java.lang.String string)
throws ControlP5XMLParseException
reader - The reader from which to retrieve the XML data.
string != null
string.length() > 0
nanoxml.XMLParseException - If an error occured while parsing the string.
ControlP5XMLParseException
public void parseString(java.lang.String string,
int offset)
throws ControlP5XMLParseException
reader - The reader from which to retrieve the XML data.offset - The first character in string to scan.
string != null
offset < string.length()
offset >= 0
nanoxml.XMLParseException - If an error occured while parsing the string.
ControlP5XMLParseException
public void parseString(java.lang.String string,
int offset,
int end)
throws ControlP5XMLParseException
reader - The reader from which to retrieve the XML data.offset - The first character in string to scan.end - The character where to stop scanning.
This character is not scanned.
string != null
end <= string.length()
offset < end
offset >= 0
nanoxml.XMLParseException - If an error occured while parsing the string.
ControlP5XMLParseException
public void parseString(java.lang.String string,
int offset,
int end,
int startingLineNr)
throws ControlP5XMLParseException
reader - The reader from which to retrieve the XML data.offset - The first character in string to scan.end - The character where to stop scanning.
This character is not scanned.startingLineNr - The line number of the first line in the data.
string != null
end <= string.length()
offset < end
offset >= 0
nanoxml.XMLParseException - If an error occured while parsing the string.
ControlP5XMLParseException
public void parseCharArray(char[] input,
int offset,
int end)
throws ControlP5XMLParseException
reader - The reader from which to retrieve the XML data.offset - The first character in string to scan.end - The character where to stop scanning.
This character is not scanned.
input != null
end <= input.length
offset < end
offset >= 0
nanoxml.XMLParseException - If an error occured while parsing the string.
ControlP5XMLParseException
public void parseCharArray(char[] input,
int offset,
int end,
int startingLineNr)
throws ControlP5XMLParseException
reader - The reader from which to retrieve the XML data.offset - The first character in string to scan.end - The character where to stop scanning.
This character is not scanned.startingLineNr - The line number of the first line in the data.
input != null
end <= input.length
offset < end
offset >= 0
nanoxml.XMLParseException - If an error occured while parsing the string.
ControlP5XMLParseExceptionpublic void removeChild(ControlP5XMLElement child)
child - The child element to remove.
child != null
child is a child element of the receiver
addChild(XMLElement),
nanoxml.XMLElement#countChildren(),
nanoxml.XMLElement#enumerateChildren(),
nanoxml.XMLElement#getChildren()public void removeAttribute(java.lang.String name)
name - The name of the attribute.
name != null
name is a valid XML identifier
null
nanoxml.XMLElement#enumerateAttributeNames(),
setDoubleAttribute(String, double),
setIntAttribute(String, int),
setAttribute(String, Object),
getAttribute(String),
getAttribute(String, Object),
getAttribute(String, Hashtable, String, boolean),
getStringAttribute(String),
getStringAttribute(String, String),
getStringAttribute(String, Hashtable, String, boolean),
getIntAttribute(String),
getIntAttribute(String, int),
getIntAttribute(String, Hashtable, String, boolean),
getDoubleAttribute(String),
getDoubleAttribute(String, double),
getDoubleAttribute(String, Hashtable, String, boolean),
getBooleanAttribute(String, String, String, boolean)public void removeProperty(java.lang.String name)
removeAttribute instead.
name - The name of the attribute.public void removeChild(java.lang.String name)
removeAttribute instead.
name - The name of the attribute.public void setContent(java.lang.String content)
content - The new content string.public void setTagName(java.lang.String name)
setName instead.
name - The new name.public void setName(java.lang.String name)
name - The new name.
name != null
name is a valid XML identifier
nanoxml.XMLElement#getName()public java.lang.String toString()
toString in class java.lang.Objectwrite(Writer)
public void write(java.io.Writer writer)
throws java.io.IOException
writer - The writer to write the XML data to.
writer != null
writer is not closed
java.io.IOException - If the data could not be written to the writer.nanoxml.XMLElement#toString()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||